home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
COM
/
LineShare 3.3.1 folder.sit
/
LineShare 3.3.1 folder
/
LineShare 3.3.1
/
ARA_LineShare
next >
Wrap
Text File
|
1995-03-27
|
5KB
|
279 lines
! Version 3.0.3
! ARA 2.0 script for connections through a LineShare subPort.
! All modem-specific commands should be moved to the LineShare script.
! So, this ARA script is universal
!
! We assume that the LineShare script has set the modem to the
! "Direct" mode, if the "CONNECT" message is detected
! (in this case our business is to adjust the serial port speed), or to the
! "Normal" mode, if the "CARRIER" message is detected.
! If LineShare returns the REL message,
! we tell ARA 2.0, that a reliable link is established
!
!
@ORIGINATE
@ANSWER
HSReset 0 0 0 0 0 0
!
! Load Factory configurations (i.e. reset the LineShare emulator),switch off the echo
!
matchclr
matchstr 1 1 "OK¥13¥10"
write "AT&FE0M^2¥13"
matchread 10
jump 79
@LABEL 1
!
! The modem is ready so enable answering, or originate a call
!
ifAnswer 10
!
! 0,1,2 - Normal,Blind,Manual
ifStr 6 7 "0"
ifStr 6 5 "1"
ifStr 6 4 "2"
Jump 8
!
@LABEL 4
Note "Manual dialing initiated..." 3
Write "ATX1D ¥13"
Jump 15
!
@LABEL 5
note "Dialing without dialtone." 3
MatchClr
MatchStr 1 7 "OK¥13¥10"
Write "ATX3¥13"
MatchRead 30
jump 79
!
! Parameter 1 contains the full dialstring from the connection document.
! Parameter 3 contains "P" for pulse & "t" for tone dialing.
! Parameter 7, 8 & 9 contain the dial string fragments (only parameter 7 is used)
@Label 7
Note "Dialing ^7." 3
Write "ATD^3^7¥13"
Jump 15
@Label 8
Note "Dialing ^1." 3
Write "ATDT^1¥13"
Jump 15
!
!
! Answering
@LABEL 10
MatchClr
MatchStr 1 15 "OK¥13¥10"
Write "ATS0=1¥13"
MatchRead 30
Jump 79
!
@LABEL 15
MatchClr
MatchStr 1 19 "CARRIER "
Matchstr 2 18 "CONNECT "
matchstr 8 16 "RING¥13¥10"
matchstr 9 17 "REL¥13¥10"
matchstr 10 70 "NO CARRIER¥13¥10"
matchstr 11 70 "ERROR¥13¥10"
matchstr 12 72 "NO DIALTONE¥13¥10"
matchstr 13 73 "BUSY¥13¥10"
matchstr 14 74 "NO ANSWER¥13¥10"
matchread 800
ifAnswer 10
Jump 79
!
@LABEL 16
ifOriginate 15
userhook 1
note "Answering phoneノ" 2
Jump 15
!
@LABEL 17
userhook 2
note "Reliable linkノ" 3
jump 15
!
! Process the "CONNECT" message - assume that we are in the "Direct" mode
@LABEL 18
MatchClr
matchstr 2 22 "2400"
matchstr 3 23 "4800"
matchstr 4 24 "7200"
matchstr 5 25 "9600"
matchstr 6 26 "12000"
matchstr 7 27 "14400"
matchstr 8 28 "16800"
matchstr 9 29 "19200"
matchread 10
jump 79
!
! Process the "CARRIER" message - assume that we are in the Normal/REL mode
@LABEL 19
MatchClr
matchstr 2 32 "2400¥13"
matchstr 3 33 "4800"
matchstr 4 34 "7200"
matchstr 5 35 "9600"
matchstr 6 36 "12000"
matchstr 7 37 "14400"
matchstr 8 38 "16800"
matchstr 9 39 "19200"
matchstr 10 40 "21600"
matchstr 11 41 "24000"
matchstr 12 42 "26400"
matchstr 13 43 "28800"
matchread 10
jump 79
@LABEL 22
note "Communicating at 2400 bps." 2
setspeed 2400
jump 61
!
@LABEL 23
note "Communicating at 4800 bps." 2
setspeed 4800
jump 61
!
@LABEL 24
note "Communicating at 7200 bps." 2
setspeed 7200
jump 61
!
@LABEL 25
note "Communicating at 9600 bps." 2
setspeed 9600
jump 61
!
@LABEL 26
note "Communicating at 12000 bps." 2
setspeed 12000
jump 61
!
@LABEL 27
note "Communicating at 14400 bps." 2
setspeed 14400
jump 61
!
@LABEL 28
note "Communicating at 16800 bps." 2
setspeed 16800
jump 61
!
@LABEL 29
note "Communicating at 19200 bps." 2
setspeed 19200
jump 61
!
! CARRIER XXXX processing
!
@LABEL 32
note "Linked at 2400 bps." 2
CommunicatingAT 2400
jump 60
!
@LABEL 33
Note "Linked at 4800 bps." 2
CommunicatingAT 4800
jump 60
!
@LABEL 34
note "Linked at 7200 bps." 2
CommunicatingAT 7200
jump 60
!
@LABEL 35
note "Linked at 9600 bps." 2
CommunicatingAT 9600
jump 60
!
@LABEL 36
note "Linked at 12000 bps." 2
CommunicatingAT 12000
jump 60
!
@LABEL 37
note "Linked at 14400 bps." 2
CommunicatingAT 14400
jump 60
!
@LABEL 38
note "Linked at 16800 bps." 2
CommunicatingAT 16800
jump 60
!
@LABEL 39
note "Linked at 19200 bps." 2
CommunicatingAT 19200
jump 60
!
@LABEL 40
note "Linked at 21600 bps." 2
CommunicatingAT 21600
jump 60
!
@LABEL 41
note "Linked at 24000 bps." 2
CommunicatingAT 24000
jump 60
!
@LABEL 42
note "Linked at 26400 bps." 2
CommunicatingAT 26400
jump 60
!
@LABEL 43
note "Linked at 28800 bps." 2
CommunicatingAT 28800
jump 60
!
@LABEL 60
HSReset 0 1 0 0 0 0
@LABEL 61
ifANSWER 62
pause 30
@LABEL 62
exit 0
!
!
! 70: error messages
! No carrier
@LABEL 70
exit -6021
! No Dial Tone
@LABEL 72
exit -6020
! Busy
@LABEL 73
exit -6022
! No Answer
@LABEL 74
exit -6023
! Invalid Varstring Value
@LABEL 76
exit -6027
! Modem error
@LABEL 79
exit -6019
!
! Hang up the modem
!
@HANGUP
HSReset 0 0 0 0 0 0
settries 0
@LABEL 80
DTRClear
pause 2
DTRSet
write "ATZ¥13"
matchclr
matchstr 1 82 "OK¥13¥10"
matchread 30
inctries
iftries 3 82
jump 80
!
@LABEL 82
exit 0